import { createStore } from "vuex";
export default createStore({
  state: {
    //全局变量
    username: "vue3",
  },
  mutations: {
    //全局函数
    editfn: (state, val) => {
      state.username = val;
    },
  },
  actions: {},
  modules: {},
});
